package listener;

import listener.obsever.concrete_observer.SharesPeople;
import listener.subject.Shares;
import listener.subject.concrete_subject.SharesEvent;

public class Client {
    public static void main(String[] args) {
        Shares shares = new SharesEvent();

        SharesPeople people1 = new SharesPeople("张晓成");
        SharesPeople people2 = new SharesPeople("曹老师");
        SharesPeople people3 = new SharesPeople("王老师");

        shares.attach(people1);
        shares.attach(people2);
        shares.attach(people3);

        shares.notifyPeople(1);
        shares.notifyPeople(2);
        shares.notifyPeople(5);

    }
}
